# -*- coding: utf-8 -*-
from django.conf.urls import url, include
from .views import *

userprofile_list = UserProfileListViewSet.as_view({
    'get': 'list',
    'post': 'create',  # 自动生成html表单
})

clerk_list = ClerkListViewSet.as_view({
    'get': 'list',
    'post': 'create',  # 自动生成html表单
})

customer_list = CustomerListViewSet.as_view({
    'get': 'list',
    'post': 'create',  # 自动生成html表单
})
# `create()`, `retrieve()`, `update()`,`partial_update()`, `destroy()` and `list()`actions.

urlpatterns = [
    url(r'^userprofiles/$', userprofile_list),
    url(r'^clerks/$', clerk_list),
    url(r'^customers/$', customer_list),
]
